package main

import (
	"fmt"

	RxGo "github.com/lp/rxgo"
)

func main() {
	RxGo.Just(1, 5, 7, 1, 5, 6, 6, 9).Distinct().Subscribe(func(x int) {
		fmt.Print(x)
	})
	fmt.Println()

	RxGo.Just(2, 3, 5, 7, 11, 13).ElementAt(4).Subscribe(func(x int) {
		fmt.Print(x)
	})
	fmt.Println()

	RxGo.Just(2, 3, 5, 7, 11, 13).Skip(2).Subscribe(func(x int) {
		fmt.Print(x)
	})
	fmt.Println()

	RxGo.Just(2, 3, 5, 7, 11, 13).First().Subscribe(func(x int) {
		fmt.Print(x)
	})
	fmt.Println()

	RxGo.Just(2, 3, 5, 7, 11, 13).SkipLast(2).Subscribe(func(x int) {
		fmt.Print(x)
	})
	fmt.Println()
}